package com.citrinus.feedme.list;

import java.util.Comparator;

import com.citrinus.feedme.places.Place;

public class RestaurantComparator implements Comparator<Place> {

	@Override
	public int compare(Place p1, Place p2) {
		if (p1.getDistanceToUserInYards() < p2.getDistanceToUserInYards()) {
			return -1;
		} else if (p1.getDistanceToUserInYards() > p2.getDistanceToUserInYards()) {
			return 1;
		}
		return 0;
	}
}

